package com.llxjr.example.docdemo02.controller;

import com.llxjr.example.docdemo02.util.WordToHtml;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import sun.rmi.runtime.Log;

@RestController
@Slf4j
public class UploadController {

    @PostMapping("/upload")
    public void upload(@RequestParam("file") MultipartFile file){
        WordToHtml wordToHtml = new WordToHtml();
        String convertToHtml = wordToHtml.convertToHtml(file);
        log.info(convertToHtml);
    }
}
